import { Controller, Get, Param, ParseIntPipe } from '@nestjs/common'
import { RouterService } from './router.service'

@Controller('router')
export class RouterController {
  constructor(private readonly routerService: RouterService) {}

  @Get()
  findAll() {
    return this.routerService.findAll()
  }

  @Get(':id')
  findOne(@Param('id', ParseIntPipe) rid: number) {
    return this.routerService.findOne(rid)
  }
}
